//二级路由
import Find from '@/views/Seconds/find.vue'
import Index from '@/views/Seconds/index.vue'
import User from '@/views/Seconds/user.vue'
import Info from '@/views/Seconds/info.vue'
//一级路由
import Layout from '@/views/layout.vue'
import Detail from '@/views/detail.vue'
import Login from '@/views/login.vue'
import Register from '@/views/register.vue'
import Rent from '@/views/rent.vue'
import Collection from '@/views/collection.vue'
import City from '@/views/city.vue'
import Map from '@/views/map.vue'
import Release from '@/views/releaseHousing.vue'
import Search from '@/views/searchCommunity.vue'

const routes = [
  {
    path: '/',
    redirect: '/layout/index'
  },
  {
    path: '/layout',
    name: 'RentLayout',
    component: Layout,
    children: [
      {
        path: 'find',
        component: Find
      },
      {
        path: 'index',
        component: Index
      },
      {
        path: 'user',
        component: User
      },
      {
        path: 'info',
        component: Info
      }
    ]
  },
  {
    path: '/detail',
    component: Detail,
    name: 'detail'
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/register',
    component: Register
  },
  {
    path: '/collection',
    component: Collection
  },
  {
    path: '/rent',
    component: Rent
  },
  {
    path: '/city',
    component: City
  },
  {
    path: '/map',
    component: Map
  },
  {
    path: '/releaseHouse',
    component: Release
  },
  {
    path: '/searchCommunity',
    component: Search
  }
]

export default routes
